/**
 * 
 */
package ar.edu.unq.svnpermission.provider;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;
import ar.edu.unq.svnpermission.domain.User;
import ar.edu.unq.svnpermission.ui.model.Members;


/**
 * @author nicolas
 */
public class UsersDataProvider extends SortableDataProvider<User> {

	private static final long serialVersionUID = 1L;
	private List<User> users = new ArrayList<User>();
	
	public UsersDataProvider()
	{
		
	}
	
	public UsersDataProvider(List<User> users)
	{
		this.setUsers(users);
	}

	public Iterator<? extends User> iterator(int first, int count) {
		return this.getUsers().iterator();
	}

	public int size() {
		return this.getUsers().size();
	}

	public IModel<User> model(User object) {
		return new Model<User>(object);
	}

	public List<User> getUsers() {
		return users;
	}

	public void setUsers(List<User> users) {
		this.users = users;
	}

}
